﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
   
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {

        if (!!keyValue) {
            $.ajax({
                url: "/Project/CourseTime/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);


                }
            });
        } else {
            $("#form1").formSerialize("add");
        }
    });
    function submitForm() {
        var postData = $("#form1").formSerialize();
        if (!$('#form1').formValid()) {
            return false;
        }
        debugger;
        $.submitForm({
            url: "/Project/CourseTime/SubmitForm?keyValue=" + keyValue,
            param: postData,
            success: function () {
                // $.currentWindow().$("#gridList").resetSelection();
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }
</script>
<form id="form1">
    <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#">基本信息</a></li>
        </ul>
        <div style="padding-top: 20px; margin-right: 30px;">
            <table class="form">
                <tr>
                    <th class="formTitle">课程名称</th>
                    <td class="formValue">
                        <input id="Name" name="Name" type="text" class="form-control required" placeholder="请输入课程类型" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">添加人</th>
                    <td class="formValue">
                        <input id="AddUserName" name="AddUserName" type="text" class="form-control " placeholder="未填写时默认当前用户为添加人" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">上课时间</th>
                    <td class="formValue">
                        <editor field="ClassTime" id="ClassTime" index="1" editor="ueditor" text="请输入上课时间"></editor>
                       
                    </td>
                </tr>
                @*<tr>
                    <th class="formTitle" colspan="1">课程说明</th>
                    <td class="formValue" colspan="3">
                        <textarea id="ContenAbstract" name="ContenAbstract" class="form-control" style="height: 60px;"></textarea>
                    </td>
                </tr>*@
            </table>
        </div>
    </div>
</form>
